home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / C-D / CoolMacStacks.sea / Cool Mac Stacks / Fun and Games / Renaissance Man / stack_-1.xml < prev    next >
Extensible Markup Language  |  1991-12-17  |  13KB  |  24 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in</name>
  5.     <id>-1</id>
  6.     <cardCount>3</cardCount>
  7.     <cardID>6165</cardID>
  8.     <listID>4385</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>-- "Renaissance Man" version 2.0-- copyright 1988,1991 Ann DeVito-- Saskatoon, SK, Canada-- Internet address:  devito@skorpio.usask.ca-- Please list any modifications you make to this stack-- here and in the "About Renaissance Man" field on the "Help" card.-- revised by Ann DeVito, July 1991:  version 2.0-- modification history:  replaced options card with menu--   amalgamated about and help cards--   automated text tranfer to user's customized wordliston openStackglobal gTotalWrong, gWordListRM, gWordRMglobal gPriorLevelRM--because we'll be busy setting upset the cursor to 4push recent cardhide message boxset the lockscreen to trueshow menubar  --because we have a customized menu--------------------------------Protection, of a mild sort.--------------------------------We restrict the user's options by setting the userlevel to 2 only,-- but we do not forbid the knowledgable user from resetting-- the userlevel to 5 so that they can inspect scripts if they wish.--Also, we do not restrict navigation via the menu, because-- it can't hurt anything. (I hope!)-- We do restrict navigation when user is customizing wordlist,-- because it is messy otherwise.--set up menus and userlevel--set the userLevel to 2 to enable typing, but not much else--first save the prior userlevelput the userLevel into gPriorLevelRMset the userLevel to 2--restrict menus--get rid of font and style because we have no use for them here &--they just clutter up menubardelete menu "Font"delete menu "Style"--delete "new card" and "delete card" because they should not be useddelete menuItem "New Card" of menu "Edit"delete menuItem "Delete Card" of menu "Edit"-- get rid of dashes left behindif last menuItem of menu "Edit" = "-" thendelete last menuItem of menu "Edit"end ifaddOurMenu  --script appears below--set up the game cardput empty into field "average" of card "game"put 0 into field "wordNumber" of card "game"put 0 into gTotalWrongif the marked of cd "game" is false then--we need to clean up game and get new worddoNewWord--this  method of entering dashes works well from the first cardrepeat for the number of chars in gWordRMput "-" after field "newletters" of card "game"end repeatelse--clean enough, no need for new wordput fld "theWord" of cd "game" into gWordRMput 1 into fld "wordNumber" of cd "game"end ifset the lockscreen to falseend openStackon closeStackglobal gPriorLevelRM, gOurMenu, gcustomizingif gcustomizing thenundocustomizeend if--reset menusdelete menu gOurMenureset menubar--to compact stack if it is too largeput the size of this stack into HMsizeput the freeSize of this stack into HMfreeif HMfree > .2 * HMsize thendoMenu Compact Stackend if--set the userLevel to what it was before user opened stackset the userLevel to gPriorLevelRMend closeStackon doNewWordglobal gWordListRM, gWrongSoFar, gWordRMset the cursor to 4set the lockscreen to true--show the fields that mask the Ren manset the numberFormat to 0repeat with p = 1 to 8put "error" & p into wrongNumbershow cd fld wrongNumber of cd "game"end repeatput empty into field "response" of card "game"put empty into field "wrongletters" of card "game"put empty into field "newletters" of card "game"put empty into gWrongSoFarput empty into field "guessletters" of card "game"add 1 to field "wordNumber" of card "game"put any word of cd fld gWordListRM of card "game" into gWordRM--store gWordRM so we can access it if we come back after--quitting hypercard with no need to clean upput gWordRM into fld "theWord" of cd "game"set the marked of cd "game" to trueset the lockscreen to falseend doNewWord--musicon rightTuneglobal gMusicif gMusic then play "harpsichord" gend rightTuneon wrongTuneglobal gMusicif gMusic then play "boing"end wrongTuneon rudeTuneglobal gMusicif gMusic then play "boing" bs g b gend rudeTuneon HappyTuneglobal gMusicif gMusic then play "harpsichord" tempo 160 be gq ee gq ge eq deend HappyTuneon dirgeglobal gMusicif gMusic thenplay "sax" tempo 150 d3h dq. de dhplay "sax" tempo 150 f3q. ee eq. de dq. dbe. dhend ifend dirge---------- Customized menu --------on addOurMenuglobal gOurMenu, gMusic, gSixTries, gWordListRM, gShortsglobal gCustomizing--add our new menuput "R. Man" into gOurMenu--crummy title, but it's short and fits on screen even at level 5-- the only reason I've got it as a global is that I don't like it-- and don't want to do massive replacements if I ever change itcreate menu gOurMenu--navigation commandsput "R. Man Game Card" into menu gOurMenu with menuMsg "doPlay"put "R. Man Help Card" after menu gOurMenu with menuMsg "doHelp"put "-,Modest,Unashamed" after menu gOurMenu with ¬¨menuMsgs ",clothe,strip"put "-,Noisy,Silent" after menu gOurMenu with ¬¨menuMsgs ",chooseMusic true,chooseMusic false"put "-,Six Tries,Eight Tries" after menu gOurMenu with ¬¨menuMsgs ",chooseTries six,chooseTries eight"set cmdChar of menuItem "Six Tries" of menu gOurMenu to 6set cmdChar of menuItem "Eight Tries" of menu gOurMenu to 8put "-,Standard Wordlist,Your Own Wordlist,To Customize‚Ķ" after menu gOurMenu with ¬¨menuMsgs ",chooseList standard,chooseList yours,doCustomize"put "-,Reset Average" after menu gOurMenu with ¬¨menuMsgs ",doReset"-- mark menu--modest is defaultset checkMark of menuItem "Modest" of menu gOurMenu to trueput true into gShorts--music is defaultset checkMark of menuItem "Noisy" of menu gOurMenu to trueput true into gMusic--gSixTries is defaultset checkMark of menuItem "Six Tries" of menu gOurMenu to trueput true into gSixTries--standardWordlist is defaultset checkMark of menuItem "Standard Wordlist" of menu gOurMenu to trueput StandardWordlist into gWordListRMput false into gCustomizingend addOurMenu-----------------------------navigating via the menu---------------------------on doHelpglobal gCustomizing--have to have condition only because of visual effectsif gCustomizing then--TESTING:  this allows visuals with undocustomize routingset the cursor to 4visual dissolve to blacklock screengo cd "help"unlock screen with dissolveelsevisual venetian blinds slowlygo to card "Help"end ifend doHelpon doPlayglobal gCustomizing, gOurMenu, gShortsif gCustomizing then--if you were customizing and now you want to play--we stay on same card, but hide stuffset the cursor to 4visual dissolve to blacklock screenundoCustomizeset enabled of menuitem 1 of menu gOurMenu to falseunlock screen with dissolveelse--we move to game cardvisual venetian blinds slowlygo card "game"end ifget the loc of field "guessLetters"click at itend doPlay-----------------------------Option choosing procedures---------------------------on clotheglobal gOurMenu, gShortsif not gShorts thenset checkMark of menuItem "Unashamed" of menu gOurMenu to falseset checkMark of menuItem "Modest" of menu gOurMenu to trueput true into gShortsset showPict of cd "game" to gShortsif the name of this cd is "game" thenclick at the loc of fld "guessletters"end ifend ifend clotheon stripglobal gOurMenu, gShortsif gShorts thenset checkMark of menuItem "Modest" of menu gOurMenu to falseset checkMark of menuItem "Unashamed" of menu gOurMenu to trueput false into gShortsset showPict of cd "game" to gShortsif the short name of this cd = "game" thenclick at the loc of fld "guessletters"end ifend ifend stripon chooseList choice-- selects which wordlist to useglobal gWordListRM, gOurMenuif choice = standard thenput standardWordlist into gWordListRMput "Standard Wordlist" into selectedput "Your Own Wordlist" into rejectedelseput yourOwnWordlist into gWordListRMput "Your Own Wordlist" into selectedput "Standard Wordlist" into rejectedend if--reset customized menuset the checkMark of menuItem selected of menu gOurMenu ¬¨to trueset the checkMark of menuItem rejected of menu gOurMenu to false--put cursor back in place on game cdif the short name of this cd = "game" thenclick at the loc of fld "guessletters"end ifend chooseListon doCustomize--takes user to info on customizing wordlistglobal gCustomizing, gOurMenuset the cursor to 4put true into gCustomizing  --flag so we know we're customizingvisual dissolve to blacklock screenset the visible of cd fld "big mask" of cd "game" to trueset the visible of  cd fld "label" of cd "game" to trueset the visible of  cd fld "label 2" of cd "game" to trueset the visible of  cd fld "label 3" of cd "game" to trueset the visible of  cd fld "YourOwnWordlist" of cd "game" to trueset the visible of cd btn "help" of cd "game" to trueset the visible of cd btn "home" of cd "game" to trueset the visible of cd btn "to type words in directly" of cd "game" to trueset the visible of cd btn "to import words from a text file" of cd "game" to trueset the visible of cd btn "play" of cd "game" to trueset the enabled of menuItem "to customize‚Ķ" of menu gOurMenu to false--RESTRICT NAVIGATIONset enabled of menu "go" to false--TESTINGunlock screen with dissolveif the short name of this cd is not "game" thengo cd "game"elseset enabled of menuitem 1 of menu gOurMenu to trueend ifend doCustomizeon undoCustomize--hides info on customizing wordlistglobal gCustomizing, gOurMenu--TESTING-- set the cursor to 4put false into gCustomizing  --flag so we know we're done customizing-- --TESTING-- visual dissolve to black-- lock screenset the visible of cd fld "big mask" of cd "game" to falseset the visible of  cd fld "label" of cd "game" to falseset the visible of  cd fld "label 2" of cd "game" to falseset the visible of  cd fld "label 3" of cd "game" to falseset the visible of  cd fld "typing info" of cd "game" to falseset the visible of  cd fld "auto info" of cd "game" to falseset the visible of  cd fld "YourOwnWordlist" of cd "game" to falserepeat with i = 1 to 8set the visible of cd btn i of cd "game" to falseend repeatset the enabled of menuItem "to customize‚Ķ" of menu gOurMenu to true--Permit NAVIGATIONset enabled of menu "go" to true--TESTING-- unlock screen with dissolveend undoCustomizeon chooseTries num--user wants to choose number of tries availableglobal gSixTries, gWrongSoFar, gOurMenu--only works if user is not in middle of failing attemptif gWrongSoFar is not empty thenanswer "Sorry, you must choose a new word" && ¬¨"before changing the number of tries." with "OK"exit chooseTriesend if--if six tries selectedif num = six thenput "Six Tries" into selectedput "Eight Tries" into rejectedput true into gSixTrieselse  --if eight tries selectedput "Eight Tries" into selectedput "Six Tries" into rejectedput false into gSixTriesend if--reset customized menuset the checkMark of menuItem selected of menu gOurMenu to trueset the checkMark of menuItem rejected of menu gOurMenu to false--put cursor back in place on game cdif the short name of this cd = "game" thenclick at the loc of fld "guessletters"end ifend chooseTrieson chooseMusic boolglobal gMusic, gOurMenuput bool into gMusicif bool thenset the checkMark of menuItem "Noisy" of menu gOurMenu to trueset the checkMark of menuItem "Silent" of menu gOurMenu to falseelseset the checkMark of menuItem "Noisy" of menu gOurMenu to falseset the checkMark of menuItem "Silent" of menu gOurMenu to trueend if--put cursor back in place on game cdif the short name of this cd = "game" thenclick at the loc of fld "guessletters"end ifend chooseMusicon doReset--user wants to reset averageglobal gTotalWrong, gWrongSoFar--only works if user is not in middle of failing attemptif gWrongSoFar is not empty thenanswer "Sorry, you must choose a new word" && ¬¨"before resetting the average." with "OK"exit doResetend ifput 1 into field "wordNumber" of card "game"put 0 into gTotalWrongput empty into field "average" of card "game"--put cursor back in place on game cdif the short name of this cd = "game" thenclick at the loc of fld "guessletters"end ifend doReset</script>
  17.     <background id="2678" file="background_2678.xml" name="game" />
  18.     <background id="3299" file="background_3299.xml" name="" />
  19.     <background id="5841" file="background_5841.xml" name="" />
  20.     <card id="6165" file="card_6165.xml" marked="false" name="HM Intro" owner="5841" />
  21.     <card id="7282" file="card_7282.xml" marked="true" name="game" owner="2678" />
  22.     <card id="2874" file="card_2874.xml" marked="false" name="Help" owner="3299" />
  23. </stack>
  24.